import Taro, { useState } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { AtButton } from 'taro-ui'
import './index.scss'
import { getIpInfo } from '@src/servers/servers'
function Index(){

  // const [userName ,setUserName] = useState('Hello World!!!!')
  const clickButton = () => {
    console.log("我点击了按钮")
    getIpInfo().then(res=>{
      console.log(res)
    }).catch(err=>console.log(err))
  }

  

  return (
    <View>
        <AtButton type='primary' size='small' style={{width: '100px'}} circle onClick={clickButton}>发起请求</AtButton>
    </View>
  )

}

export default Index